package com.ruoyi.apis.repository;

import com.ruoyi.apis.entity.OnlineEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author Choi
 * @Date 2021/7/19
 */


public interface OnlineRepository extends JpaRepository<OnlineEntity, Long> {

    OnlineEntity findById(long onlineId);

    List<OnlineEntity> findAllByOrderBySortAsc();

    Page<OnlineEntity> findAllByOrderBySortAsc(Pageable pageable);

    List<OnlineEntity> findAllByTitleLikeOrderBySortAsc(String title);
}
